home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Drivers / Uforce_v1_00.lha / reader.c < prev    next >
C/C++ Source or Header  |  1992-03-24  |  446b  |  30 lines

  1. /*
  2.  
  3.  reader.c - a simple example of how to read a multi-byte Uforce packet
  4.  
  5.  Ethan Dicks  <erd@kumiss.UUCP>
  6.  
  7.  Version 1.0  24-Mar-1992
  8.  
  9. */
  10.  
  11. #include <stdio.h>
  12. #include "Uforce.h"
  13.  
  14. void main ()
  15. {
  16.     Uforce_data   U;
  17.  
  18.     init_NES();
  19.     while(1)
  20.     {
  21.     
  22.     /* Aquire a sample buffer */
  23.     query_Uforce(&U);
  24.  
  25.     /* Display the sample buffer */
  26.     printf("%02x %02x %02x %02x %02x %02x %02x %02x %02x\r",
  27.         U.f0, U.a0, U.a1, U.a2, U.a3, U.a4, U.a5, U.a6, U.a7);
  28.     }
  29. }
  30.